Skip to contentSkip to conversation

How to use linux-firmware to install single firmware package? #kirkstone

DISCUSSION Livius 4 participants 9 messages Nov 3, 2022 – Nov 7, 2022

lore
Share & tools
lore

Livius

author
#0 lore raw

Hi,

I would like to install linux-firmware-ath10k and linux-firmware-imx-sdma-imx7d firmware package to my image recipe in kirkstone release but when i append them to IMAGE_INSTALL somewhy each pack from linux-firmware recipe installs itself. It is extramly large in size about 500 MB, it is totaly not accaptable for me, it is too large.

I am using the following syntax to install them:

IMAGE_INSTALL:append = " linux-firmware-imx-sdma-imx7d linux-firmware-ath10k"

If i remove them, there are no any linux-firmware in my deployed image, it means somehow they trigger to install the full linux-firmware pack, how can i use it to install only some single linux-firmware?

#1 lore raw

Hi Livius,

Quoted 8 lines · Livius

Hi,

I would like to install linux-firmware-ath10k and linux-firmware-imx-sdma-imx7d firmware package to my image recipe in kirkstone release but when i append them to IMAGE_INSTALL somewhy each pack from linux-firmware recipe installs itself. It is extramly large in size about 500 MB, it is totaly not accaptable for me, it is too large.

I am using the following syntax to install them:

IMAGE_INSTALL:append = " linux-firmware-imx-sdma-imx7d linux-firmware-ath10k"

This seems correct to me.

Quoted 2 lines

If i remove them, there are no any linux-firmware in my deployed image, it means somehow they trigger to install the full linux-firmware pack, how can i use it to install only some single linux-firmware?

There might be an issue somewhere, we need to debug this. Can you reproduce this with only poky?

Which version of oe-core/yocto are you using?

Can you run bitbake -g <your-image>? Check that only your linux-firmwasre packages are installed in the image. You can also check that the linux-firmware packages don't contain more files than they should (either look into the .rpm/.deb/.ipk packages in tmp/deploy or in WORKDIR/packages/ of linux-firmware). Also look at the .dot files with your favorite text editor and check what does linux-firmware-ath10k bring in as a dependency, maybe there's a bad dependency somewhere that brings some other packages in.

Cheers,
Quentin

author
#2 lore raw

In my tmp/deploy/rpm/noarch folder i can see many-many other firmware .rpm files like linux-firmware-bcm43xx, linux-firmware-nvidia-tegra and so on, these were not planed to be installed. It seems to me, the full linux-firmware package was deployed somehow. I think i am using poky now, this is my path for linux-firmware: PROJECT/sources/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20220913.bb

So, my poky come from git.yoctoproject.org ( https://git.yoctoproject.org/poky/log/?h=kirkstone ) , i use latest kirkstone commit ( https://git.yoctoproject.org/poky/commit/?h=kirkstone&id=2e79b199114b25d81bfaa029ccfb17676946d20d ).

In pn-buildlist and task-depends.dot i can see only linux-firmware, i have no any listed single package like should be linux-firmware-imx-sdma-imx7d.

#3 lore raw

Hi Livius,

Quoted 1 line · Livius

In my tmp/deploy/rpm/noarch folder i can see many-many other firmware .rpm files like linux-firmware-bcm43xx, linux-firmware-nvidia-tegra and so on, these were not planed to be installed. It seems to me, the full linux-firmware package was deployed somehow.

Yes, that's normal. When a recipe is built, all its packages are created and put into that directory. It's not because the package is created that it's installed in the final rootfs.

Quoted 4 lines

I think i am using poky now, this is my path for linux-firmware: PROJECT/sources/poky/meta/recipes-kernel/linux-firmware/linux-firmware_20220913.bb

So, my poky come from git.yoctoproject.org ( https://urldefense.com/v3/__https://git.yoctoproject.org/poky/log/?h=kirkstone__;!!OOPJP91ZZw!iE35Nh5nRc3nFT6cCWMcIbXJsRTSva3-k0ELYN7qrnPobvaTVmufMXyu6PTsr_2phXtEqT4WAHAyDmU3tfm0A0o7KOuVycOZZMX2Wg$ ) , i use latest kirkstone commit ( https://urldefense.com/v3/__https://git.yoctoproject.org/poky/commit/?h=kirkstone&id=2e79b199114b25d81bfaa029ccfb17676946d20d__;!!OOPJP91ZZw!iE35Nh5nRc3nFT6cCWMcIbXJsRTSva3-k0ELYN7qrnPobvaTVmufMXyu6PTsr_2phXtEqT4WAHAyDmU3tfm0A0o7KOuVycMxLdUTqg$ ).

And there's no bbappend for linux-firmware anywhere? Run:
bitbake-layers show-appends linux-firmware

Quoted 2 lines

In pn-buildlist and task-depends.dot i can see only linux-firmware, i have no any listed single package like should be linux-firmware-imx-sdma-imx7d.

Mmm indeed, less helpful than I had imagined. I think you can figure out which packages are installed by adding INHERIT += "buildhistory". It should create an installed-packages.txt file after a build.

Cheers,
Quentin

#4 lore raw

I can confirm I'm seeing something similar with MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "linux-firmware-amdgpu"

I use with OE-core kirkstone HEAD + custom distro config. Was wondering of the best way to debug why issue occurs.

Is there anything else besides bitbake -g <your-image> and INHERIT += "buildhistory" that I can try? How would one best check what happens during rootfs creation?

#5 lore raw
Quoted 6 lines · Vincent Davis Jr

I can confirm I'm seeing something similar with MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "linux-firmware-amdgpu"

I use with OE-core kirkstone HEAD + custom distro config. Was wondering of the best way to debug why issue occurs.

Is there anything else besides bitbake -g <your-image> and INHERIT += "buildhistory" that I can try? How would one best check what happens during rootfs creation?

There is a log for it like for any other task - look in WORKDIR/temp/log.do_rootfs for it. You'll see exact commands issued to the package manager for one thing. That may help pinpoint where unwanted packages are being requested and installed.

Alex

author
#6 lore raw
In reply to Quentin Schulz

I have a linux-firmware_%.bbappend ( https://github.com/Freescale/meta-freescale-3rdparty/blob/kirkstone/recipes-kernel/linux-firmware/linux-firmware_%25.bbappend ) from meta-freescale-3rdparty layer. I think, it is too simple, it can not cause the problem. In my local.conf I set up to generate buildhistory (i used the following commands), soon my next image build is ready an i can share the results.

INHERIT += "buildhistory"
BUILDHISTORY_COMMIT = "0"

author
#7 lore raw

What should i check in buildhistory? In my buildhistory folder linux-firmware folder contains all packages as a subfolders, like was in my tmp/deploy/rpm/noarch. Following content is in my linux-firmware/linux-firmware-imx-sdma-imx7d/latest text file.

PE = 1
PV = 20220913
PR = r0
RPROVIDES =
RDEPENDS = linux-firmware-imx-sdma-license
RRECOMMENDS =
PKGSIZE = 2862
FILES = /lib/firmware/imx/sdma/sdma-imx7d.bin
FILELIST = /lib/firmware/imx/sdma/sdma-imx7d.bin

#8 lore raw

Hi,

Quoted 12 lines · Livius

What should i check in buildhistory? In my buildhistory folder linux-firmware folder contains all packages as a subfolders, like was in my tmp/deploy/rpm/noarch. Following content is in my linux-firmware/linux-firmware-imx-sdma-imx7d/latest text file.

PE = 1
PV = 20220913
PR = r0
RPROVIDES =
RDEPENDS = linux-firmware-imx-sdma-license
RRECOMMENDS =
PKGSIZE = 2862
FILES = /lib/firmware/imx/sdma/sdma-imx7d.bin
FILELIST = /lib/firmware/imx/sdma/sdma-imx7d.bin

The installed-packages.txt would probably list all linux-firmware packages I assume?

Could you also check the linux-firmware/linux-firmware-imx-sdma-license/latest text file and tell us what it contains? Because the content of linux-firmware/linux-firmware-imx-sdma-imx7d/latest seems to be fine.

Cheers,
Quentin